## -*- coding: utf-8 -*-

<%def name="username()" filter="trim">
  <%
    from google.appengine.api import users
    user = users.get_current_user()
  %>
  % if user:
    <b>${user.email()}</b>
  % else:
    ${ h.link_to(u'サインイン', users.create_login_url('/')) }
  % endif
</%def>

<%def name="logout()">
  <%
    from google.appengine.api import users
    user = users.get_current_user()
  %>
  % if user:
    ${ h.link_to(u'サインアウト', users.create_logout_url('/')) }
  % endif
</%def>
